package chapter02

import scala.collection.mutable

object Test24_Set {
  def main(args: Array[String]): Unit = {
    //set集合 数据是无序 数据不重复
    val set = Set(1, 2, 3, 4, 5, 6 ,6)
    println(set)
    //可变类型的set
    val set1 = mutable.Set(1, 2, 3, 4, 5, 6, 6)
    println(set1)
    set1.add(10)
    set1.add(6)
    println(set1)
    set1.remove(10)
    println(set1)
    //println(set1(2))
    set1.foreach(println(_))
  }
}